import request from '@/utils/request'

// 查询车辆收费记录列表
export function listRecordCharge(query) {
  return request({
    url: '/parking/recordCharge/list',
    method: 'get',
    params: query
  })
}

// 查询车辆收费记录详细
export function getRecordCharge(id) {
  return request({
    url: '/parking/recordCharge/' + id,
    method: 'get'
  })
}

// 新增车辆收费记录
export function addRecordCharge(data) {
  return request({
    url: '/parking/recordCharge',
    method: 'post',
    data: data
  })
}

// 修改车辆收费记录
export function updateRecordCharge(data) {
  return request({
    url: '/parking/recordCharge',
    method: 'put',
    data: data
  })
}

// 删除车辆收费记录
export function delRecordCharge(id) {
  return request({
    url: '/parking/recordCharge/' + id,
    method: 'delete'
  })
}

// 远程开闸
export function openGate(serialNumber) {
  return request({
    url: '/parking/recordOut/openGateBySerialNumber/' + serialNumber,
    method: 'get'
  })
}

